//
// Created by mac on 1/28/22.
//

#include <iostream>

using namespace std;

int hammingDistance(int x, int y) {

    int n = x^y;

    int res = 0;
    for (int i = 0; i < 32; i++) {
        res += n & 1;
        n >>= 1;
    }
    return res;
}